<?php
/**
 * @Notes: 文件描述
 * @Interface getCondition
 * @Return mixed
 * @Author: fc
 * @Time: 2021/4/19 15:28
 */

namespace app\common\command;

use mqtt\phpMQTT;
use think\console\Command;
use think\console\Input;
use think\console\Output;
use think\Db;
use think\facade\Hook;
use think\facade\Log;
use app\common\service\subscribeTopic;

class MqSubscribe extends Command
{

    protected function configure()
    {
        $this->setName('mq:subscribe')->setDescription('物联网主题订阅');
    }

    protected function execute(Input $input, Output $output)
    {
        $host = "111.230.25.120";
        $port = 1883;

        $re = subscribeTopic::subscribe($host, $port);

        $output->info("===================". $re ."======================");
    }


}